package _2ChapterTwo.IntroduceLocalExtension;

import java.util.Date;
import java.util.Objects;

public class MfDateWrap {
    private Date _original;

    public MfDateWrap(Date date) {
        _original = date;
    }

    public long getTime() {
        return _original.getTime();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MfDateWrap that = (MfDateWrap) o;
        return Objects.equals(_original, that._original);
    }

    @Override
    public int hashCode() {
        return Objects.hash(_original);
    }

    public Date nextDate() {
        return new Date(getTime() + 86400000);
    }

    public boolean equalsDate(Object o) {
        return _original.equals(o);
    }
}
